-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context Menu For Plugins #752
Conversation
@@ -34,7 +34,7 @@ var canUpload = window.File || window.FileReader || window.FileList || window.Bl | |||
const profile = { | |||
name: 'fileExplorers', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this new API will be public, so we should take the new very carefully. cc @bunsenstraat
*/ | ||
registerContextMenuItem (item, callback) { | ||
if (!item.name || !callback) return console.error('menu name and callback is mandatory') | ||
if (!item.type && !item.path && !item.extension && !item.pattern) return console.error('invalid file matching criteria provided') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also throw an error here, so it bounces back to the caller
* @param item { name: string, type?: string[], path?: string[], extension?: string[], pattern?: string[] } | ||
* @param callback (...args) => void | ||
*/ | ||
registerContextMenuItem (item, callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing a callback might not work in the context of an iframe... (e.g I don't think that function
is a valid parameter for a remix api
cc @bunsenstraat
a9c9a9f
to
fcb6f6a
Compare
fcb6f6a
to
0c7f92e
Compare
No description provided.